<h1>{{i18n "admin.docker.upgrade_title"}}</h1>

{{#if this.outdated}}
  <h2>{{i18n "admin.docker.outdated_image_header"}}</h2>
  <p>{{i18n "admin.docker.outdated_image_info"}}</p>

  {{! prettier-ignore }}
  <pre>
    cd /var/discourse
    git pull
    ./launcher rebuild app
  </pre>
  <p>
    <a
      href="https://meta.discourse.org/t/how-do-i-update-my-docker-image-to-latest/23325"
    >
      {{i18n "admin.docker.outdated_image_link"}}
    </a>
  </p>
{{else}}
  <button
    disabled={{this.upgradeAllButtonDisabled}}
    id="upgrade-all"
    class="btn"
    type="button"
    {{on "click" this.upgradeAllButton}}
  >
    {{#if this.allUpToDate}}
      {{i18n "admin.docker.all_up_to_date"}}
    {{else}}
      {{i18n "admin.docker.upgrade_all"}}
    {{/if}}
  </button>

  <table class="table" id="repos">
    <thead>
      <th></th>
      <th style="width: 50%">{{i18n "admin.docker.repository"}}</th>
      <th>{{i18n "admin.docker.status"}}</th>
    </thead>
    <tbody>
      {{#each this.model as |repo|}}
        <DockerManager::RepoStatus
          @repo={{repo}}
          @upgradingRepo={{repo.upgrading}}
          @managerRepo={{this.managerRepo}}
        />
      {{/each}}
    </tbody>
  </table>
{{/if}}